package generator.controller;

import com.atkt.ktkt.model.order.OrderInfo;
import com.atkt.ktkt.vo.order.OrderInfoQueryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import generator.service.OrderInfoService;
import ktkt.result.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author KT917
 * @date 2022/9/23
 */

@Api(tags = "订单管理")
@RestController
@RequestMapping(value="/admin/order/orderInfo")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

    //订单列表
    @GetMapping("/{page}/{limit}")
    public Result listOder(@PathVariable Long page,
                           @PathVariable Long limit,
                           OrderInfoQueryVo orderInfoQueryVoVo){
        Page<OrderInfo> orderInfoPage = new Page<>(page,limit);
       Map<String,Object> map= orderInfoService.selectOrderInfoPage(orderInfoPage,orderInfoQueryVoVo);
        return Result.ok(map);
    }



}
